# Maintainer: Andrea Dalle Vacche

_realname=ExtUtils-MakeMaker
pkgname=perl-${_realname}
pkgver=7.60
pkgrel=1
pkgdesc="ExtUtils::MakeMaker - Create a module Makefile"
arch=('any')
license=('GPL' 'PerlArtistic')
url="https://metacpan.org/release/ExtUtils-MakeMaker"
depends=('perl')
makedepends=('libcrypt-devel')
groups=('perl-modules')
options=('!emptydirs')
source=(https://www.cpan.org/authors/id/B/BI/BINGOS/${_realname}-${pkgver}.tar.gz
        001-msysize.patch)
sha256sums=('a073e72e70ce9b0b043dfd8218e79a82dc8ac2b3958fc9670e927d97820fea39'
            '2e460d107c65b3fe4abce518327d59bfb70adcca8ae27404f5b0f68359af30a3')

prepare() {
  cd ${_realname}-${pkgver}
  patch -p1 -i ${srcdir}/001-msysize.patch
}

build() {
  cd ${_realname}-${pkgver}
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd ${_realname}-${pkgver}
  make test
}

package() {
  cd ${_realname}-${pkgver}
  make DESTDIR="${pkgdir}" install
}
